<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss2">
    <title>详情</title>
</head>
<body>

<div class="layui-fluid">

    <div class="layui-card">
        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" lay-filter="zmn-form">
                <input type="hidden" name="contractId" th:value="${contractPaymentRecordVO.contractId}">
                <input type="hidden" name="relateId" th:value="${contractPaymentRecordVO.relateId}">

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">阶段：</label>
                    <div class="layui-input-inline" style="width:150px">
                        <select lay-filter="stage" id="stage" name="stage" lay-search lay-verify="required">
                            <option th:each="contractStage:${contractPaymentStages}" th:value="${contractStage.code}" th:selected="${contractStage.code == contractPaymentRecordVO.stage}" th:text="${contractStage.name}"/>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">约定收付时间：</label>
                    <div class="layui-input-inline" style="width:150px">
                        <input type="text" id="agreedPaymentDay" name="agreedPaymentDay" placeholder="yyyy-MM-dd" class="layui-input"
                               th:value="${contractPaymentRecordVO.agreedPaymentDay}"
                               autocomplete="off" lay-verify="required"/>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">实际收付时间：</label>
                    <div class="layui-input-inline" style="width:150px">
                        <input type="text" id="actualPaymentDay" name="actualPaymentDay" placeholder="yyyy-MM-dd" class="layui-input"
                               th:value="${contractPaymentRecordVO.actualPaymentDay}"
                               autocomplete="off" lay-verify="required"/>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">金额：</label>
                    <div class="layui-input-inline" style="width:150px">
                        <input type="text" lay-verify="required|bigAmount" name="amount" th:value="${contractPaymentRecordVO.amountYuan}" autocomplete="off" class="layui-input" maxlength="14"/>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">是否收付：</label>
                    <div class="layui-input-inline" style="width:150px">
                        <select lay-filter="payment" id="payment" name="payment" lay-search lay-verify="required">
                            <option value="" th:selected="${0 == contractPaymentRecordVO.payment}">请选择</option>
                            <option value="1" th:selected="${contractPaymentRecordVO.payment == 1}">否</option>
                            <option value="2" th:selected="${contractPaymentRecordVO.payment == 2}">是</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">备注：</label>
                    <div class="layui-input-block" style="width: 330px">
                        <div class="layui-inline">
                            <textarea style="width: 330px" name="remark" class="layui-textarea" th:text="${contractPaymentRecordVO.remark}" maxlength="100"></textarea>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button th:if="${#authPermit.checkPermit('/contract/payment/record/addEdit.action')}" class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button class="layui-btn layui-btn-primary" id="cancel">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>

<script type="text/javascript" th:inline="javascript">
    var json = {
        contractPaymentRecordVO: [[${contractPaymentRecordVO}]]
    };

    layui.config({
        version: 20200218,
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        contract_payment_record_detail_edit_js: "contract/payment/record/zmn.plat.contract.payment.record.detail.edit",
    }).use(['index', 'contract_payment_record_detail_edit_js']);
</script>
</body>
</html>